Promise.allSettled([
  Promise.resolve({
    code: 200,
    data: [1, 2, 3],
  }),
  Promise.reject({
    code: 500,
    data: [],
  }),
  Promise.resolve({
    code: 200,
    data: [7, 8, 9],
  }),
])
  .then((res) => {
    const data = res.filter((item) => item.status === "fulfilled");
    console.log("success", data);
  })
  .catch((err) => {
    console.log(err);
  });
